package com.ai.imagetext.dto;

import lombok.Data;

import java.util.List;
import java.util.Map;

@Data
public class AIRecognitionResult {
    
    /**
     * 识别是否成功
     */
    private boolean success;
    
    /**
     * 错误信息
     */
    private String errorMessage;
    
    /**
     * 识别出的标签列表
     */
    private List<TagInfo> tags;
    
    /**
     * 图片描述
     */
    private String description;
    
    /**
     * 识别出的对象列表
     */
    private List<ObjectInfo> objects;
    
    /**
     * 整体置信度
     */
    private Double confidence;
    
    /**
     * 原始响应数据
     */
    private Map<String, Object> rawResponse;
    
    @Data
    public static class TagInfo {
        private String name;
        private Double confidence;
        private String category;
    }
    
    @Data
    public static class ObjectInfo {
        private String name;
        private Double confidence;
        private BoundingBox boundingBox;
    }
    
    @Data
    public static class BoundingBox {
        private Integer x;
        private Integer y;
        private Integer width;
        private Integer height;
    }
}